﻿using System;
using System.Reflection;
using Castle.DynamicProxy;

namespace Yama.MVC.MonoRail.Extensions
{
    public class SelectActionProxyGenerationHook : IProxyGenerationHook
    {
        #region Implementation of IProxyGenerationHook

        public bool ShouldInterceptMethod(Type type, MethodInfo methodInfo)
        {
            return methodInfo.Name.Equals("SelectAction");
        }

        public void NonProxyableMemberNotification(Type type, MemberInfo memberInfo)
        {
        }

        public void MethodsInspected()
        {
        }

        #endregion
    }
}